#include "DataStruct.fxh"
#include "States.fxh"
//float4x4 mWorld;                  // World matrix for object
float4x4 mWorldViewProjection;    // World * View * Projection matrix

//--------------------------------------------------------------------------------------
// This shader computes standard transform and lighting
//--------------------------------------------------------------------------------------
VS_OUTPUT_VERTCOLOR RenderAssistLineVS( VS_INPUT_VERTCOLOR inVert )
{
    VS_OUTPUT_VERTCOLOR Output;
	     
    // Transform the position from object space to homogeneous projection space
	// Be careful!!! use float4 although the input is float3!!!
	float3 pos = inVert.Pos;
	Output.Position = mul(float4(pos,1.0), mWorldViewProjection);
	Output.VColor = inVert.VColor;
	return Output;    
}


//--------------------------------------------------------------------------------------
// This shader outputs the pixel's color by modulating the texture's
// color with diffuse material color
//--------------------------------------------------------------------------------------
float4 RenderAssistLinePS( VS_OUTPUT_VERTCOLOR In ) : SV_TARGET
{ 
	return In.VColor;
}

//--------------------------------------------------------------------------------------
// Renders normal line 
//--------------------------------------------------------------------------------------
technique11 RenderAssistLine
{
    pass P0
    {        
		SetVertexShader(CompileShader(vs_5_0, RenderAssistLineVS()));
		SetGeometryShader( NULL );
        SetPixelShader(CompileShader(ps_5_0, RenderAssistLinePS())); 
    }
}
